package com.upcode.weighing.enums;

import java.util.Objects;

/**
 * 机构状态枚举
 */
public enum PayTypesEnum {

    FULL_AMOUNT("1","全额"),
    BASICS("2","基础"),
    HISTORY("3","历史"),
    SUPPLEMENTARY_PAYMENT("4","补缴");

    private String value;
    private String msg;

    PayTypesEnum(String value, String dec) {
        this.value = value;
        this.msg = dec;
    }

    public String getValue() {
        return value;
    }

    public String getMsg() {
        return msg;
    }

    public static String getValue(String value) {
        if (Objects.isNull(value)) {
            return null;
        }
        for (PayTypesEnum u : PayTypesEnum.values()) {
            if (u.getValue().equals(value)) {
                return u.getValue();
            }
        }
        return null;
    }
}
